from django.db import models

# Create your models here.
class Brand(models.Model):
    name=models.CharField(max_length=12)
    desc=models.CharField(max_length=12)

    class Meta:
        db_table='brand'



class Goods(models.Model):
    name=models.CharField(max_length=22)
    price=models.DecimalField(max_digits=6,decimal_places=2)
    number=models.IntegerField()
    brand=models.ForeignKey(Brand,on_delete=models.CASCADE)
    class Meta:
        db_table='goods'